#!/usr/bin/perl

use lib::abs qw( .. ../../base_lib );
use JIP::ToolSet;

use Test::More tests => 10;

BEGIN { use_ok( 'Filter::Utils', qw( getFileType nameDecoder pathDecoder ) ); }
require_ok('Filter::Utils');

can_ok( 'Filter::Utils', qw( getFileType nameDecoder pathDecoder ) );

is( getFileType('filename'),     'other', 'getFileType() - filename' );
is( getFileType('filename.ext'), 'other', 'getFileType() - filename.ext' );
is( getFileType('filename.avi'), 'video', 'getFileType() - filename.avi' );
is( getFileType('filenameavi'),  'other', 'getFileType() - filenameavi' );

is( nameDecoder('tratata'), 'tratata', 'nameDecoder() - bypass ASCII' );

is( pathDecoder('/'), '/', 'pathDecoder() - root dir' );
is( pathDecoder('/1/2/3/4'), '/1/2/3/4', 'pathDecoder() - bypass ASCII' );
